import {request} from "../../request";
export function problem(data,method) {
    return request({
        url: '/problem',
        method: method,
        data: data,
        headers: {
            "Content-Type":"application/json"
        },
    })
}

export function problemLike(data) {
    return request({
        url: '/problemLike',
        method: 'post',
        data: data,
        headers: {
            "Content-Type":"application/json"
        },
    })
}

export function DeProblemLike(username,id) {
    return request({
        url: '/problemLike/' + username + '/' + id,
        method: 'delete',
        headers: {
            "Content-Type":"application/json"
        },
    })
}

export function getproblems(data,method) {
    return request({
        url: '/problem/queryProblems',
        method: method,
        data: data,
        headers: {
            "Content-Type":"application/json"
        },
    })
}

